package edu.tapestry.iddb.client.pages.serv;

import iddb.ConnectResults;

import org.apache.tapestry5.annotations.ApplicationState;
import org.apache.tapestry5.annotations.InjectPage;

import edu.tapestry.iddb.client.pages.ConnectResultsPage;
import edu.tapestry.iddb.client.webService.CommandsGenerator;
import edu.tapestry.iddb.client.webService.IDDBProxy;

public class Connect {

	@ApplicationState
	private IDDBProxy proxy;

	@InjectPage
	private ConnectResultsPage resultsPage;

	Object onSuccess() {

		ConnectResults resp = (ConnectResults) proxy.execute(CommandsGenerator
				.createConnectCommand());

		return resultsPage.initialize(resp);

	}

}
